<script setup lang="ts">
defineProps({
  title: {
    type: String,
    default: '客户全称',
  },
  shortTitle: {
    type: String,
    default: '客户简称',
  },
})
const emit = defineEmits(['switch'])
const switchFlag = ref(false)
function switchTitle() {
  switchFlag.value = !switchFlag.value
  emit('switch', switchFlag.value)
}
</script>

<template>
  <span>
    <span>{{ switchFlag ? shortTitle : title }}</span> <span class="pr-5px pl-5px" @hover.stop="() => {}" @click.stop="switchTitle"><bh-icon type="icon-xingzhuang" :title="switchFlag ? `切换为全称` : `切换为简称`" /></span>
  </span>
</template>

<style scoped lang="less">

</style>
